C Program For Finding The Length Of Loop In Linked List
Write a function detectAndCountLoop() that checks whether a given Linked List contains loop and if loop is present then returns count of nodes in loop. For example, the loop is present in below-linked list and length of the loop is 4. If the loop is not present, then the function should return 0....
read more
C – File I/O
In this article, we will learn how to operate over files using a C program. A single C file can read, write, move, and create files in our computer easily using a few functions and elements included in the C File I/O system. We can easily manipulate data in a file regardless of whether the file is a text file or a binary file using functions like fopen(), fclose(), fprintf(), fscanf(), getc(), putc(), getw(), fseek(), etc....
read more
C Program To Find Area And Perimeter of Rectangle
Here, we will find the area and perimeter of rectangle using a C Program as follows:...
read more
C Program For Hexadecimal to Decimal Conversion
Here we will build a C program for hexadecimal to decimal conversion using 5 different approaches i.e....
read more
C Program To Convert Fahrenheit To Celsius
In this article, we will learn to write a C Program to convert temperature from Fahrenheit to Celsius by applying the conversion formula to calculate the equivalent temperature in Celsius. For example, 82° in Fahrenheit is equal to 27.7° in Celcius....
read more
LCM of Two Numbers in C
In this article, we will learn how to write a C program to find the LCM of two numbers. LCM (Least Common Multiple) of two numbers is the smallest positive number that can be divided by both numbers without leaving a remainder. For example, the LCM of 15 and 25 is 75....
read more
C Program to Compute Quotient and Remainder
Given two numbers A and B. The task is to write a program to find the quotient and remainder of these two numbers when A is divided by B....
read more
ispunct() function in Csyntax:
The ispunct() function checks whether a character is a punctuation character or not. The term “punctuation” as defined by this function includes all printable characters that are neither alphanumeric nor a space. For example ‘@’, ‘$’, etc. This function is defined in ctype.h header file....
read more
C program to compare two files and report mismatches
We are given almost two identical files. But some characters are corrupted. We need to find the line number and their position where those corrupted letter exists as well as Total number of corrupted (error) letters....
read more
Print “Hello World” in C/C++ without using any header file
Write a C/C++ program that prints Hello World without including any header file....
read more
Print a long int in C using putchar() only
Write a C function print(n) that takes a long int number n as argument, and prints it on console. The only allowed library function is putchar(), no other function like itoa() or printf() is allowed. Use of loops is also not allowed....
read more
Can main() be overloaded in C++?
Predict the output of following C++ program....
read more